# Cancel an existing invoice.

You can cancel active invoices with this endpoint.
This endpoint returns structured Invoice objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `invoices` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: PUT /invoices/{id}/cancel
Version: 1.0.0

## Path parameters:

  - `id` (integer, required)
    The ID of the Model.

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `additional_items` (AdditionalItem) - When included, the `additional_item_ids` array will reference all additional items included in the invoice.
- `billing_milestones` (BillingMilestone) - When included, the `billing_milestone_ids` array will reference all billing milestones included in the invoice.
- `expenses` (Expense) - When included, the `expense_ids` array will reference all expenses included in the invoice.
- `external_references` (ExternalReference) - Includes references to external integrations for this object.
- `fixed_fee_items` (FixedFeeItem) - When included, the `fixed_fee_items` array will reference all fixed fee items included in the invoice.
- `recipient` (User) - The User who received the invoice. Namely, the client lead at the time that the invoice
was created (or null, if no lead client existed at the time).
- `time_entries` (TimeEntry) - When included, the `time_entry_ids` array will reference all time entries included in the invoice.
- `user` (User) - The user who created the invoice.
- `workspaces` (Workspace) - When included, the `workspace_ids` array will reference all projects covered by the invoice.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

